<%= head_template(config, %{title: module.title, type: module.type, noindex: false}) %>
<%= sidebar_template(config, nodes_map) %>

<div id="top-content">
  <h1>
    <%= if module.source_url do %>
      <a href="<%= module.source_url %>" title="View Source" class="icon-action" rel="help">
        <i class="ri-code-s-slash-line" aria-hidden="true"></i>
        <span class="sr-only">View Source</span>
      </a>
    <% end %>
    <span translate="no"><%= module.title %></span> <%= module_type(module) %>
    <small class="app-vsn" translate="no">(<%= config.project %> v<%= config.version %>)</small>
    <%= for annotation <- module.annotations do %>
      <span class="note">(<%= annotation %>)</span>
    <% end %>
  </h1>

  <%= if deprecated = module.deprecated do %>
    <div class="deprecated">
      This <%= module.type %> is deprecated. <%= h(deprecated) %>.
    </div>
  <% end %>

  <%= if doc = module.rendered_doc do %>
    <section id="moduledoc">
      <%= link_moduledoc_headings(doc) %>
    </section>
  <% end %>
</div>

<%= if summary != [] do %>
  <section id="summary" class="details-list">
    <h1 class="section-heading">
      <a class="hover-link" href="#summary">
        <i class="ri-link-m" aria-hidden="true"></i>
      </a>
      <span class="text">Summary</span>
    </h1>
    <%= for {name, nodes} <- summary, do: summary_template(name, nodes) %>
  </section>
<% end %>

<%= for {name, nodes} <- summary, key = text_to_id(name) do %>
  <section id="<%= key %>" class="details-list">
    <h1 class="section-heading">
      <a class="hover-link" href="#<%= key %>">
        <i class="ri-link-m" aria-hidden="true"></i>
      </a>
      <span class="text"><%= name %></span>
    </h1>
    <div class="<%= key %>-list">
      <%= for node <- nodes, do: detail_template(node, module) %>
    </div>
  </section>
<% end %>
<%= footer_template(config, module) %>
